// 2025/9/24
// dd爱框框

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, x, cur = 0; 
    cin >> n >> x;
    int ans = n, ansl = 0, ansr = n - 1;
    vector<int> nums(n);
    for(int l = 0, r = 0; r < n; r++)
    {
        cin >> nums[r];
        cur += nums[r];
        while(cur >= x)
        {
            if(r - l + 1 < ans)
            {
                ans = r - l + 1;
                ansl = l;
                ansr = r;
            }
            cur -= nums[l++];
        }
    }
    ansl++; ansr++;
    cout << ansl << " " << ansr << endl;
}
// 64 位输出请用 printf("%lld")